package com.zeng.nicecommon.util;

import java.util.HashMap;
import java.util.Map;

public class MapBuilder {
    private Map<String, Object> map;

    private MapBuilder() {

    }


    public static MapBuilder newBuilder() {
        return new MapBuilder();
    }

    public MapBuilder put(String key,Object value){

        if(map == null){
            map = new HashMap<>();
        }

        map.put(key,value);
        return this ;
    }


    public Map<String,Object> build(){
        return map ;
    }

}
